1. Field of the Invention
The present invention relates to a technique for generating an image having a wide dynamic range using a plurality of images.
2. Description of the Related Art
When the user captures an image with a digital camera outdoors, the luminance range of the captured scene is sometimes wider than a capturable luminance range. In this case, tone information of an object outside the capturable luminance range cannot be recorded, so a highlight-detail loss or shadow-detail loss occurs. For example, when a person is captured outdoors on a fine day while the exposure is adjusted to him, a highlight-detail loss may occur in the background including the sky and clouds, or a shadow-detail loss may occur in the shade of trees. On the other hand, the human vision has a characteristic called “local adaptation” that switches the adaptation state according to the brightness and color of a region one views. With this characteristic, one can perceive tones in both bright and dark places. For this reason, an impression upon viewing a captured image sometimes differs from that upon directly viewing a scene. Digital camera users complain about it.
One technique for solving this problem is a high dynamic range imaging technique (HDR technique). The HDR technique roughly includes an HDR capture technique and HDR reproduction technique.
The HDR capture technique is used to widen the capturable dynamic range and record tone information of a luminance range suffering a highlight- or shadow-detail loss. In an example of this technique, images captured at a plurality of exposure values are composited. An image acquired by the HDR capture technique will be called an HDR image.
The HDR reproduction technique is an image processing technique for preferably reproducing an HDR image having a wide dynamic range by a display/output device having a narrow dynamic range. In an example of this technique, the low-frequency components of an HDR image are compressed. The HDR technique can reduce highlight- and shadow-detail losses by the capture technique for widening the dynamic range and a reproduction technique corresponding to a captured image having a wide dynamic range.
In the HDR image compositing technique, when compositing images captured at different exposure values, the compositing locations of the target images need to be calculated accurately. However, the HDR image is obtained by compositing images captured at different times, so the images to be composited are not identical in all pixels. However, images captured within a short time have a high degree of correlation and can be composited after slightly correcting the compositing locations.
A mark for correcting the location is necessary in compositing location correction for compositing images captured within a short time. In other words, respective images need to have a region where the same object is captured. In general, identical regions are extracted from respective images captured at different exposure values by executing brightness correction for the images (Japanese Patent Application No. 2005-045804).
However, when compositing images having greatly different exposure times, it is difficult to extract identical regions by only performing exposure compensation owing to a shadow-detail loss in an image having a short exposure time and a highlight-detail loss in an image having a long exposure time. Hence, an image suffering many highlight-detail losses and one suffering many shadow-detail losses cannot be simultaneously aligned by only brightness correction.